package org.henzhi.util;

import java.util.List;

public class PageBean<T> {
     private int curPage=1;//当前页
     private int pageSize=3;//每页大小
     private int totalRecord;//总记录数
     private int totalPage;//总页数
     
     //创建用于存储分页数据列表的集合对象
     private List<T> list;

	public int getCurPage() {
		return curPage;
	}

	public void setCurPage(int curPage) {
		if(curPage<0||curPage>totalPage){
			this.curPage=1;
		}
		this.curPage = curPage;
	}

	public int getPageSize() {
		if(pageSize<0||curPage>pageSize){
			this.pageSize=3;
		}
		return pageSize;
	}

	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}

	public int getTotalRecord() {
		return totalRecord;
	}

	public void setTotalRecord(int totalRecord) {
		this.totalRecord = totalRecord;
	}

	public int getTotalPage() {
		return totalPage;
	}

	public void setTotalPage(int totalPage) {
		this.totalPage = totalPage;
	}

	public List<T> getList() {
		return list;
	}

	public void setList(List<T> list) {
		this.list = list;
	}
}
